﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Script.Serialization;

namespace Core.Json
{
    public class JsonSerializer
    {
        public JsonSerializer()
        { 
        }
        public static string JsonSerializerTest(object entity)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            serializer.RegisterConverters(new JavaScriptConverter[] { new DataTableConvert() });

            return serializer.Serialize(entity); 
        }
    }
}
